<template>
  <div class="home">
    <demo-item-three
      v-for="(item, index) in list"
      :key="index"
      :num="item.num"
    ></demo-item-three>
    <!-- <demo-item-three
      v-for="(item, index) in list"
      :key="index"
    ></demo-item-three> -->
    <button @click="change">change</button>
  </div>
</template>

<script>
import demoItemThree from "@/components/demoItemThree.vue";

export default {
  name: "DemoThree",
  components: {
    demoItemThree,
  },
  data() {
    return {
      list: [
        {
          id: 0,
          num: 1,
        },
        {
          id: 1,
          num: 2,
        },
        {
          id: 2,
          num: 3,
        },
      ],
    };
  },
  methods: {
    change() {
      this.list.reverse();
    },
  },
};
</script>
